// Fig. 11.21: fig11_21.cpp
// Complex class test program.
#include <iostream>
using std::cin;
using std::cout;
using std::endl;

#include "Complex.h"

int main()
{
   Complex x, k;
   Complex y (4.3, 8.2);
   Complex z (3.3, 1.1);

   cout << "Please a Complex number in the form (a,b):\n";
   cin >> k;

   cout << "\nx: " << x;
   cout << "\ny: " << y;
   cout << "\nz: " << z;
   cout << "\nk: " << k;

   x = y + z;
   cout << "\n\nx = y + z:" << endl;
   cout << x << " = " << y << " + " << z;

   x = y - z;
   cout << "\n\nx = y - z:" << endl;
   cout << x << " = " << y << " - " << z << endl;

   x = y * z;
   cout << "\n\nx = y * z:" << endl;
   cout << x << " = " << y << " * " << z << endl << endl;

   cout << x << (x == k ? " == " : " != ") << k << endl;
   cout << k << (k == k ? " == " : " != ") << k << endl;

   return 0;
} // end main
